home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsICookieConsent.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  119 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICookieConsent.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICookieConsent_h__
  6. #define __gen_nsICookieConsent_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. #ifndef __gen_nsICookie_h__
  14. #include "nsICookie.h"
  15. #endif
  16.  
  17. /* For IDL files that don't want to include root IDL files. */
  18. #ifndef NS_NO_VTABLE
  19. #define NS_NO_VTABLE
  20. #endif
  21. class nsIURI; /* forward declaration */
  22.  
  23. class nsIHttpChannel; /* forward declaration */
  24.  
  25.  
  26. /* starting interface:    nsICookieConsent */
  27. #define NS_ICOOKIECONSENT_IID_STR "f5a34f50-1f39-11d6-a627-0010a401eb10"
  28.  
  29. #define NS_ICOOKIECONSENT_IID \
  30.   {0xf5a34f50, 0x1f39, 0x11d6, \
  31.     { 0xa6, 0x27, 0x00, 0x10, 0xa4, 0x01, 0xeb, 0x10 }}
  32.  
  33. class NS_NO_VTABLE nsICookieConsent : public nsISupports {
  34.  public: 
  35.  
  36.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOOKIECONSENT_IID)
  37.  
  38.   /**
  39.    * getConsent
  40.    *
  41.    * gives a decision on what should be done with a cookie, based on a site's
  42.    * p3p policy and the user's preferences. the policy for the given URI and
  43.    * channel is also returned.
  44.    *
  45.    * @param uri
  46.    *        the URI to find the policy for
  47.    * @param httpChannel
  48.    *        the channel to extract the p3p headers from
  49.    * @param isForeign
  50.    *        true if the cookie originates from a third-party site. this is used
  51.    *        to decide the cookie status based on user preferences.
  52.    * @param policy
  53.    *        the policy for the given URI, or nsICookie::POLICY_UNKNOWN if one
  54.    *        cannot be found. valid values are defined in nsICookie.idl.
  55.    *
  56.    * @return nsCookieStatus value. valid values are defined in nsICookie.idl.
  57.    */
  58.   /* nsCookieStatus getConsent (in nsIURI uri, in nsIHttpChannel httpChannel, in boolean isForeign, out nsCookiePolicy policy); */
  59.   NS_IMETHOD GetConsent(nsIURI *uri, nsIHttpChannel *httpChannel, PRBool isForeign, nsCookiePolicy *policy, nsCookieStatus *_retval) = 0;
  60.  
  61. };
  62.  
  63. /* Use this macro when declaring classes that implement this interface. */
  64. #define NS_DECL_NSICOOKIECONSENT \
  65.   NS_IMETHOD GetConsent(nsIURI *uri, nsIHttpChannel *httpChannel, PRBool isForeign, nsCookiePolicy *policy, nsCookieStatus *_retval); 
  66.  
  67. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  68. #define NS_FORWARD_NSICOOKIECONSENT(_to) \
  69.   NS_IMETHOD GetConsent(nsIURI *uri, nsIHttpChannel *httpChannel, PRBool isForeign, nsCookiePolicy *policy, nsCookieStatus *_retval) { return _to GetConsent(uri, httpChannel, isForeign, policy, _retval); } 
  70.  
  71. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  72. #define NS_FORWARD_SAFE_NSICOOKIECONSENT(_to) \
  73.   NS_IMETHOD GetConsent(nsIURI *uri, nsIHttpChannel *httpChannel, PRBool isForeign, nsCookiePolicy *policy, nsCookieStatus *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetConsent(uri, httpChannel, isForeign, policy, _retval); } 
  74.  
  75. #if 0
  76. /* Use the code below as a template for the implementation class for this interface. */
  77.  
  78. /* Header file */
  79. class nsCookieConsent : public nsICookieConsent
  80. {
  81. public:
  82.   NS_DECL_ISUPPORTS
  83.   NS_DECL_NSICOOKIECONSENT
  84.  
  85.   nsCookieConsent();
  86.  
  87. private:
  88.   ~nsCookieConsent();
  89.  
  90. protected:
  91.   /* additional members */
  92. };
  93.  
  94. /* Implementation file */
  95. NS_IMPL_ISUPPORTS1(nsCookieConsent, nsICookieConsent)
  96.  
  97. nsCookieConsent::nsCookieConsent()
  98. {
  99.   /* member initializers and constructor code */
  100. }
  101.  
  102. nsCookieConsent::~nsCookieConsent()
  103. {
  104.   /* destructor code */
  105. }
  106.  
  107. /* nsCookieStatus getConsent (in nsIURI uri, in nsIHttpChannel httpChannel, in boolean isForeign, out nsCookiePolicy policy); */
  108. NS_IMETHODIMP nsCookieConsent::GetConsent(nsIURI *uri, nsIHttpChannel *httpChannel, PRBool isForeign, nsCookiePolicy *policy, nsCookieStatus *_retval)
  109. {
  110.     return NS_ERROR_NOT_IMPLEMENTED;
  111. }
  112.  
  113. /* End of implementation class template. */
  114. #endif
  115.  
  116. #define NS_COOKIECONSENT_CONTRACTID "@mozilla.org/cookie-consent;1"
  117.  
  118. #endif /* __gen_nsICookieConsent_h__ */
  119.